#include "IQHello.h"


// [1] C++ 对象实现
class IQHelloImpl : public IQHello {
public:
    std::string getHello() override {
        return "Hello, World!(Cpp)";
    }
};

// [2] 对象创建与销毁 C++ 对象实现
extern "C" {
    IQImplType impl_t() {
        return IQ_IMPL_CPP;
    }

    DECLARE_CREATE_FUNC(IQHello) {
        return new IQHelloImpl();
    }

    DECLARE_DELETE_FUNC(IQHello) {
        delete ptr;
    }
}